package tj.eskhata.pos.domain;

// Generated 18.10.2010 9:56:13 by Hibernate Tools 3.3.0.GA

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PsDoctrans generated by hbm2java
 */
@Entity
@Table(name = "PS_DOCTRANS", schema = "MTA")
public class PsDoctrans implements DomainObject {

	private Long id;
	private SprPaySystem sprPaySystem;
	private Long paySystemId;
	private String kdp;
	private ClPoint clPoint;
	private Long pointId;
	private SprNp sprNp;
	private ClPart clPart;
	private Long partId;
	private Sprval sprval;
	private Long valId;
	private Sprval sprvalOut;
	private Long valOutId;
	private BigDecimal rate;
	private Client client;
	private Long clientId;
	private String clientKor;
	private Sost sost;
	private Long sostId;
	private Date datedoc;
	private BigDecimal summa;
	private BigDecimal summaNt;
	private BigDecimal summaPo;
	private BigDecimal summaComis;
	private BigDecimal summaComisNt;
	private String nazpl;
	private Long plDocId;
	private User createUser;
	private String typeTrans;
	private Long historyState;
	private Long numberZayav;
	private Long numberFDoc;
	private Country country;

	public PsDoctrans() {
	}

	public PsDoctrans(Long id) {
		this.id = id;
	}

	public PsDoctrans(Long id, SprPaySystem sprPaySystem,
			ClPoint clPoint, SprNp sprNp, ClPart clPart, Sprval sprval,
			Long valId,Sprval sprvalOut,Long valOutId,String clientKor,
			Client client, Sost sost, Date datedoc, BigDecimal summa,
			BigDecimal summaNt, BigDecimal summaComis, BigDecimal summaComisNt,
			String nazpl, Long plDocId, User createUser,
			String typeTrans, Long historyState) {
		this.id = id;
		this.sprPaySystem = sprPaySystem;
		this.clPoint = clPoint;
		this.sprNp = sprNp;
		this.clPart = clPart;
		this.sprval = sprval;
		this.sprvalOut = sprvalOut;
		this.valId=valId;
		this.valOutId=valOutId;
		this.client = client;
		this.clientKor=clientKor;
		this.sost = sost;
		this.datedoc = datedoc;
		this.summa = summa;
		this.summaNt = summaNt;
		this.summaComis = summaComis;
		this.summaComisNt = summaComisNt;
		this.nazpl = nazpl;
		this.plDocId = plDocId;
		this.createUser = createUser;
		this.typeTrans = typeTrans;
		this.historyState = historyState;
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PAY_SYSTEM")
	public SprPaySystem getSprPaySystem() {
		return this.sprPaySystem;
	}

	public void setSprPaySystem(SprPaySystem sprPaySystem) {
		this.sprPaySystem = sprPaySystem;
	}

	@Column(name = "PAY_SYSTEM", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getPaySystemId() {
		return this.paySystemId;
	}

	public void setPaySystemId(Long paySystemId) {
		this.paySystemId = paySystemId;
	}

	@Column(name = "KDP", length = 16)
	public String getKdp() {
		return this.kdp;
	}

	public void setKdp(String kdp) {
		this.kdp = kdp;
	}

	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLPOINT")
	public ClPoint getClPoint() {
		return this.clPoint;
	}

	public void setClPoint(ClPoint clPoint) {
		this.clPoint = clPoint;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CODE_NP")
	public SprNp getSprNp() {
		return this.sprNp;
	}

	public void setSprNp(SprNp sprNp) {
		this.sprNp = sprNp;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLPART")
	public ClPart getClPart() {
		return this.clPart;
	}

	public void setClPart(ClPart clPart) {
		this.clPart = clPart;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "VALUTA")
	public Sprval getSprval() {
		return this.sprval;
	}

	public void setSprval(Sprval sprval) {
		this.sprval = sprval;
	}
	
	@Column(name = "VALUTA", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getValId() {
		return this.valId;
	}
	public void setValId(Long valId) {
		this.valId = valId;
	}
	
	@Column(name = "CLPOINT", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getPointId() {
		return this.pointId;
	}
	public void setPointId(Long pointId) {
		this.pointId = pointId;
	}

	@Column(name = "CLPART", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getPartId() {
		return this.partId;
	}
	public void setPartId(Long partId) {
		this.partId = partId;
	}


	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLIENT")
	public Client getClient() {
		return this.client;
	}

	public void setClient(Client client) {
		this.client = client;
	}
	
	@Column(name = "CLIENT", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getClientId() {
		return this.clientId;
	}

	public void setClientId(Long clientId) {
		this.clientId = clientId;
	}

	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STATE")
	public Sost getSost() {
		return this.sost;
	}

	public void setSost(Sost sost) {
		this.sost = sost;
	}

	@Column(name = "STATE", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getSostId() {
		return this.sostId;
	}
	public void setSostId(Long sostId) {
		this.sostId = sostId;
	}
	
	@Temporal(TemporalType.DATE)
	@Column(name = "DATEDOC", length = 7)
	public Date getDatedoc() {
		return this.datedoc;
	}

	public void setDatedoc(Date datedoc) {
		this.datedoc = datedoc;
	}

	@Column(name = "SUMMA", precision = 17)
	public BigDecimal getSumma() {
		return this.summa;
	}

	public void setSumma(BigDecimal summa) {
		this.summa = summa;
	}

	@Column(name = "SUMMA_NT", precision = 17)
	public BigDecimal getSummaNt() {
		return this.summaNt;
	}

	public void setSummaNt(BigDecimal summaNt) {
		this.summaNt = summaNt;
	}

	@Column(name = "SUMMA_COMIS", precision = 17)
	public BigDecimal getSummaComis() {
		return this.summaComis;
	}

	public void setSummaComis(BigDecimal summaComis) {
		this.summaComis = summaComis;
	}

	@Column(name = "SUMMA_COMIS_NT", precision = 17)
	public BigDecimal getSummaComisNt() {
		return this.summaComisNt;
	}

	public void setSummaComisNt(BigDecimal summaComisNt) {
		this.summaComisNt = summaComisNt;
	}

	@Column(name = "NAZPL", length = 500)
	public String getNazpl() {
		return this.nazpl;
	}

	public void setNazpl(String nazpl) {
		this.nazpl = nazpl;
	}

	@Column(name = "PL_DOC_ID", precision = 22, scale = 0)
	public Long getPlDocId() {
		return this.plDocId;
	}

	public void setPlDocId(Long plDocId) {
		this.plDocId = plDocId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATE_USER")
	//@Column(name = "CREATE_USER", precision = 22, scale = 0)
	public User getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(User createUser) {
		this.createUser = createUser;
	}

	@Column(name = "TYPE_TRANS", length = 1)
	public String getTypeTrans() {
		return this.typeTrans;
	}

	public void setTypeTrans(String typeTrans) {
		this.typeTrans = typeTrans;
	}

	@Column(name = "HISTORY_STATE", precision = 22, scale = 0)
	public Long getHistoryState() {
		return this.historyState;
	}

	public void setHistoryState(Long historyState) {
		this.historyState = historyState;
	}

	@Column(name = "NUMBER_ZAYAV", precision = 22, scale = 0)
	public Long getNumberZayav() {
		return this.numberZayav;
	}

	public void setNumberZayav(Long numberZayav) {
		this.numberZayav = numberZayav;
	}

	@Column(name = "NUMBER_FDOC", precision = 22, scale = 0)
	public Long getNumberFDoc() {
		return this.numberFDoc;
	}

	public void setNumberFDoc(Long numberFDoc) {
		this.numberFDoc = numberFDoc;
	}	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "VALUTA_OUT", insertable=false,updatable=false)
	public Sprval getSprvalOut() {
		return sprvalOut;
	}

	public void setSprvalOut(Sprval sprvalOut) {
		this.sprvalOut = sprvalOut;
	}
	@Column(name = "VALUTA_OUT", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getValOutId() {
		return valOutId;
	}

	public void setValOutId(Long valOutId) {
		this.valOutId = valOutId;
	}
	@Column(name = "RATE", precision = 22, scale = 0)
	public BigDecimal getRate() {
		return rate;
	}

	public void setRate(BigDecimal rate) {
		this.rate = rate;
	}
	@Column(name = "CLIENT_KOR", length = 100)
	public String getClientKor() {
		return clientKor;
	}

	public void setClientKor(String clientKor) {
		this.clientKor = clientKor;
	}
	@Column(name = "SUMMA_PO", precision = 17)
	public BigDecimal getSummaPo() {
		return summaPo;
	}

	public void setSummaPo(BigDecimal summaPo) {
		this.summaPo = summaPo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COUNTRY")
	public Country getCountry() {
		return this.country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	
	public void copy( PsDoctrans psDoc) {
		this.setId(psDoc.getId());
		this.setSprPaySystem(psDoc.getSprPaySystem());
		this.setClPoint(psDoc.getClPoint());
		this.setSprNp(psDoc.getSprNp());
		this.setClPart(psDoc.getClPart());
		this.setSprval(psDoc.getSprval());
		this.setValId(psDoc.getValId());
		this.setSprvalOut(psDoc.getSprvalOut());
		this.setValOutId(psDoc.getValOutId());
		this.setClient(psDoc.getClient());
		this.setClientKor(psDoc.getClientKor());
		this.setSost(psDoc.getSost());
		this.setDatedoc(psDoc.getDatedoc());
		this.setSumma(psDoc.getSumma());
		this.setSummaNt(psDoc.getSummaNt());
		this.setSummaComis(psDoc.getSummaComis());
		this.setSummaComisNt(psDoc.getSummaComisNt());
		this.setSummaPo(psDoc.getSummaPo());
		this.setRate(psDoc.getRate());
		this.setNazpl(psDoc.getNazpl());
		this.setPlDocId(psDoc.getPlDocId());
		this.setCreateUser(psDoc.getCreateUser());
		this.setTypeTrans(psDoc.getTypeTrans());
		this.setHistoryState(psDoc.getHistoryState());
		this.setPaySystemId(psDoc.getPaySystemId());
		this.setClientId(psDoc.getClientId());
		
	}

}
